package com.unisound.tracelog.client.sql.mybatis.autoconfigure;

import com.unisound.tracelog.client.core.autoconfigure.TraceLogClientCoreAutoConfiguration;
import com.unisound.tracelog.client.core.properties.TraceLogClientProperties;
import com.unisound.tracelog.client.core.service.TraceLogService;
import com.unisound.tracelog.client.sql.mybatis.ExecutorSqlInterceptor;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@AutoConfigureAfter(TraceLogClientCoreAutoConfiguration.class)
public class TraceLogClientSqlMybatisAutoConfiguration {
    @Bean
    public ExecutorSqlInterceptor executorSqlInterceptor(TraceLogClientProperties traceLogClientProperties, TraceLogService traceLogService) {
        return new ExecutorSqlInterceptor(traceLogClientProperties, traceLogService);
    }

}
